package com.example.pfe;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends Activity implements OnClickListener{
	Button btn_client = null;
	Button btn_four = null;
	Button nouveau = null;
	Button btn_liv = null;
	Button btn_comm = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tableaudebord);
		btn_client= (Button)findViewById(R.id.btn_client);
		btn_client.setOnClickListener(this);
		btn_liv= (Button)findViewById(R.id.btn_liv);
		btn_liv.setOnClickListener(this);
		btn_comm= (Button)findViewById(R.id.btn_comm);
		btn_comm.setOnClickListener(this);
		btn_four= (Button)findViewById(R.id.btn_four);
		btn_four.setOnClickListener(this);
	//   monBouton = (Button)findViewById(R.id.buttonToast);
  //    monBouton.setOnClickListener(this);
	
		
	
	}
	
	 public void onClick(View v) {
	  		if(v == btn_client){
			Intent monIntent = new Intent(this,client2.class);
	  	      startActivity(monIntent);}
	  		else{
	  			if(v == btn_liv){
	  				Intent monIntent = new Intent(this,bande1.class);
	  		  	      startActivity(monIntent);}
	  			else{
	  				if(v ==btn_comm ){
		  				Intent monIntent = new Intent(this,commande1.class);
		  		  	      startActivity(monIntent);}
	  			
	  		
	  		else{
  				if(v == btn_four){
	  				Intent monIntent = new Intent(this,fournisseur2.class);
	  		  	      startActivity(monIntent);}
  			}
  				
	  			}}
	  		}}
	  		  	    	
	  		  	     
	  		
	  	    
	  	    	
	  	      
	  		
	
	  		
	 		
	 
//	 public void onClick(View v) {
//	  		if(v == nouveau){
//			Intent monIntent = new Intent(this,Client1.class);
//	  	      startActivity(monIntent);
//			
//	 		}
//	 }
	
//@Override
//public boolean onCreateOptionsMenu(Menu menu) {
	 //Inflate the menu; this adds items to the action bar if it is present.
	//	getMenuInflater().inflate(R.menu.activity_main, menu);
//		return true;
//
//}

//	@Override
	 
	 
//	public void onClick(View v) {
//		if(v == monBouton){
//			Intent monIntent = new Intent(this,MonAutreActivite.class);
//			startActivity(monIntent);
//		}
//		
//	}
	